
package hibernate.template.basic;

import hibernate.model.bean.PersonInfo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.e885.log.E885Logger;

/**
 * 
 * 
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 * @company E885 Group
 * @copyright Copyright (c) 2001-2008
 */

public class HibernateTemplateBasicTester
{
	private String id = "8af081eb1b255b09011b255b0c8e0015";

	public HibernateTemplateBasicTester()
	{
		ApplicationContext context = new ClassPathXmlApplicationContext( "hibernate/template/basic/hibernateTemplateBasic.xml" );

		PersonInfoDAOTemplateBasic personInfoDAO = ( PersonInfoDAOTemplateBasic )context.getBean( "userDAOTemplateBasic" );

		PersonInfo bean = personInfoDAO.findById( id );

		E885Logger.testLog.debug( "identity:" + bean.getId() );
		E885Logger.testLog.debug( "name:" + bean.getName() );
		E885Logger.testLog.debug( "address:" + bean.getAddress() );
	}

	/**
	 * @param args
	 */
	public static void main( String[] args )
	{
		new HibernateTemplateBasicTester();
	}

}
